<template>
  <div class="stat-card-container">
    <!-- <div class="survey-title">{{ cards.surveyTitle }}</div> -->
    <div class="stat-card-row">
      <div class="stat-card" v-for="item in stats" :key="item.title">
        <div class="stat-title">{{ item.title }}</div>
        <div class="stat-value">{{ item.value }}</div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { computed } from "vue";
const props = defineProps({
  cards: {
    type: Object,
    required: true,
  },
});

const stats = computed(() => [
  { title: "总人数", value: props.cards.totalEmployees },
  { title: "实测人数（人）", value: props.cards.completedEmployees },
  { title: "未测试人数（人）", value: props.cards.pendingEmployees },
  { title: "免测人数（人）", value: "-" },
  { title: "平均分", value: "-" },
]);
</script>

<style scoped>
.stat-card-container {
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}
.survey-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
}
.stat-card-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.stat-card {
  background: #f7fafd;
  border-radius: 8px;
  flex: 1;
  min-height: 80px;
  padding: 16px 24px 12px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.stat-title {
  font-size: 13px;
  color: #b0b6c3;
  margin-bottom: 8px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #222;
}
</style>
